package br.diego.tb.googleinterview;

public class RelativeSort {

    public static void relative_sort(Integer[] v) 
    {
    	runArrayForNegatives(v);
    	runArrayForPositives(v);
    }
    
    private static void runArrayForNegatives(Integer[] array)
    {
    	for(int value : array)
    	{
    		if(value < 0)
    			System.out.print(value  + " ");
    	}
    }
    
    private static void runArrayForPositives(Integer[] array)
    {
    	for(int value : array)
    	{
    		if(value >= 0)
    			System.out.print(value + " ");
    	}
    }
}
